import request from '@/utils/request'

/**
 * 获取角色列表
 * @param { page, pageSize} params
 * @returns
 */
export const getRoleListAPI = (params) => request.get('/park/sys/role', { params })
/**
 * 获取tree权限列表
 * @returns
 */
export const getTreeListAPI = () => request.get('/park/sys/permision/all/tree')
/**
 * 获取当前角色权限点列表
 * @returns
 */
export const getRoleDetailAPI = (roleId) => request.get(`/park/sys/role/${roleId}`)
/**
 * 获取角色成员列表
 * @returns
 */
export const getRoleUserAPI = (roleId) => request.get(`/park/sys/roleUser/${roleId}`)
/**
 * 创建角色
 * @returns
 */
export const createRoleUserAPI = (data) => request.post(`/park/sys/role`, data)
/**
 * 更改角色
 * @returns
 */
export const updateRoleAPI = (data) => request.put(`/park/sys/role`, data)
/**
 * 删除角色
 * @returns
 */
export const delRoleUserAPI = (roleId) => request.delete(`/park/sys/role/${roleId}`)
